package Array;


public class ArrayOperation {
	private int data;
	public ArrayOperation(){
		
		
	}
	/**
	 * @param args
	 */
	public void swap(int[] array,int i,int j){
		int temp =0;
		temp =array[i];
		array[i]=array[j];
		array[j]=temp;
	}
	
	
	public static void main(String[] args) {
		int [] array = {1,2,3,4,5};
		ArrayOperation test = new ArrayOperation();
		test.swap(array,1,4);
		for(int i=0; i < array.length; i++){
			System.out.println(array[i]);
			
		}
			
		// TODO Auto-generated method stub
//		int [] array1 = new int [5];
//		
//		int [] array2 = {1,2,3,4,5};
//		final int size = 5;
//		int [] array3 = new int[size];
//		
//		array1[0]=5;
//		array1[1]=4;
//		array1[2]=3;
//		System.out.println(array1[0]+" "+array1[1]+" "+array1[2]);
//		
//		int count = 0;
//		int count1 =0;
//		for (count1 = 0; count1 <array2.length;count1++){
//			array2[count1]=count1;
//			System.out.println(array2[count1]+"\n");
//			
//		for(count = (array3.length -1);count >=0; count --){
//			array3[count]=count;
//			System.out.println(array3[count]+"\n");
//			
		}
			
		
	}


